package com.hqyj.yanguangzhi.mapper;

import com.hqyj.common.dao.BaseTopicMapper;
import com.hqyj.common.pojo.BaseTopic;
import com.hqyj.common.pojo.ShortTopic;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.scheduling.annotation.Async;

import java.util.List;

/**
 * YanGG
 *
 * @InterfaceName: OEMapper
 * @author: yanguangzhi
 * @date: 2021/10/21 9:30
 */

public interface OEMapper extends BaseTopicMapper {

    @Select("SELECT * FROM `base_topic` WHERE topic_type=1 ORDER BY RAND() limit 5")
    List<BaseTopic> queryRandomBaseOneTopic();

    @Select("SELECT * FROM `base_topic` WHERE topic_type=2 ORDER BY RAND() limit 5")
    List<BaseTopic> queryRandomBaseTwoTopic();

    @Select("SELECT * FROM `base_topic` WHERE topic_type=0 ORDER BY RAND() limit 5")
    List<BaseTopic> queryRandomBaseThreeTopic();

    int putAnsWer(String testPaperName, String one, String two, String zero, String shortTopic, Integer userId);
}
